﻿using System;

namespace Validity
{
  public static class Verify
  {
    public static void Null<T>(T value)
      where T : class
    {
      if (value != null)
        throw new ArgumentException("Argument invalid; value is not null.", "value");
    }

    public static void NotNull<T>(T value)
      where T : class
    {
      if (value == null)
        throw new ArgumentException("Argument invalid; value is null.", "value");
    }
    
    public static void True(Boolean value)
    {
      if (!value)
        throw new ArgumentException("Argument invalid; value is false.", "value");
    }

    public static void False(Boolean value)
    {
      if (value)
        throw new ArgumentException("Argument invalid; value is true.", "value");
    }
  }
}
